A New Parallel Algorithm for Generalized LR Parsing

نویسندگان

  • Hiroaki Numazaki
  • Hozumi Tanaka
چکیده

Tomita's parsing algorithm [~Ibmita 86], which adapted the LR parsing algorithm to context fl'ee grammars, makes use of a breadth-first strategy to handle LR table conflicts. As the breadth-first strategy is compatible with parallel processing, we can easily develop a parallel generalized LR parser b~ed on Tomita's algorithm [Tanaka 89]. However, there is a problem in that this algorithm synchronizes parsing processes on each shift a,:tion for the same input word to merge many s t~ks :into Graph Structured Stacks (GSS). In other words, a process that has completed a shift action must wait until all other processes have ended theirs --a strategy that reduces parallel performance. We have developed a new parallel parsing algorithm that does not need to wait for shift actions before merging many stacks, using stream communication of a concurrent logic programming language called GIIC [Ueda 85]. Thus we obtain a parallel generalized LR parser implemented in GHC. 1 I n t r o d u c t i o n To provide an efficient parser tbr natural language sentences, a parallel parsing algorithm is desirable. As Tomita's algorithm is compatible with parallel processing, we can easily develop a parallel generalized LR parser [Tanaka 89]. However, with respect to the performance of the parallel parsing, one of the defects of Tomita's algorithm is that it forces many parsing processes to synchronize on each shift action for the same input word. A parsing process that has completed a shift action must wait until all other processes have con> pleted their shift actions as well; such a synchronization strategy reduces the performance of parallel parsing. In this paper, we will present a new parallel parsing algorithm which is a natural extension of Tomita's [Tolnita 86]. Our algorithm can achieve greater performance in parallel parsing for natural language sentences. There are two major differences between Tomita's algorithm and ours. Initially, the new algorithm does not make parsing processes wait for shift actions to merge many stacks with the same top state. The process that has finished a 'shift N' action first can proceed to the next actions until a reduce action needs to pop the element 'N' from the stack. If some other parsing processes carry out the same 'shift N' actions, their stacks will be merged into the position in which the first process has placed an element by the 'shift N' action. Secondly, to avoid duplications of parsing processes the new algorithm employs rl~ree Structured Stacks (TSS) instead of Graph Structured Stacks (GSS). The reason why we do not use GSS is because it is rather complicated to implement the GSS data structure in the framework of a parallel logic prograrnming language ,inch as GltC. The merge operation of the stacks is realized by a GttC stream communication mechanism. In section 2 we explain generalized LR parsing, in section 3 give a brief introduction to GtIC, and in section 4 decribe our new parallel generalized LR parsing algotihm. In section 5 we compare tile parallel parsing performance of our algorithm with Tornita's.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Faster Generalized LR Parsing

Tomita devised a method of generalized LR (GLR) parsing to parse ambiguous grammars e ciently. A GLR parser uses linear-time LR parsing techniques as long as possible, falling back on more expensive general techniques when necessary. Much research has addressed speeding up LR parsers. However, we argue that this previous work is not transferable to GLR parsers. Instead, we speed up LR parsers b...

متن کامل

Generalized Lr Parsing Algorithm for Boolean Grammars

The generalized LR parsing algorithm for context-free grammars is extended for the case of Boolean grammars, which are a generalization of the context-free grammars with logical connectives added to the formalism of rules. In addition to the standard LR operations, Shift and Reduce, the new algorithm uses a third operation called Invalidate, which reverses a previously made reduction. This oper...

متن کامل

A New Approach to the Construction of Generalized LR Parsing Algorithms

LR parsing strategies can analyze LR grammars, which are deterministic. If we consider LR parsing tables in which each entry can contain several actions, we obtain non-deterministic LR parsing, often known as generalized LR parsing, which can analyze non-deterministic context-free grammars. It this context, some mechanism is needed in order to represent the non-deterministic evolution of the st...

متن کامل

ar X iv : c m p - lg / 9 60 50 18 v 1 1 3 M ay 1 99 6 Efficient Tabular LR Parsing

We give a new treatment of tabular LR parsing, which is an alternative to Tomita’s generalized LR algorithm. The advantage is twofold. Firstly, our treatment is conceptually more attractive because it uses simpler concepts, such as grammar transformations and standard tabulation techniques also know as chart parsing. Secondly, the static and dynamic complexity of parsing, both in space and time...

متن کامل

Parsing Partially Ordered Multisets

A partiallyordered multiset or pomset is a generalizationof a string in which the total order has been relaxed to a partial order. Strings are often used as a model for sequential computation; pomsets are a natural model for parallel and distributed computation. By viewing pomsets as a generalization of strings, the question is raised whether concepts from language theory can be generalized to ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1990